﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TJ_BLSHJGRSFSModelWebForm.aspx.cs" Inherits="Anke.SHManage.Web.Reports.TJ_BLSHJGRSFSModelWebForm" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>病历审核结果（人数/份数）统计表</title>
    <script src="../Content/EasyUI/jquery.js"></script>
    <script src="../Content/EasyUI/jquery.easyui.js"></script>
    <script src="../Content/EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <link href="../Content/EasyUI/themes/icon.css" rel="stylesheet" />
    <link href="../Content/EasyUI/themes/default/easyui.css" rel="stylesheet" />
    <script src="../Scripts/jquery.AnkeExtend.js"></script>
    <script type="text/javascript">
        //页面加载
        $(document).ready(function () {
            DisableBackspace();
            reload();
        });
        function EUIcombobox(jqS, o) {
            $.ajax({
                type: "POST",
                async: false,
                url: o.url,
                dataType: "JSON",
                success: function (data1, textStatus, jqXHR) {
                    o.data = o.OneOption.concat(data1);
                    delete o.url;
                    delete o.OneOption;
                    $(jqS).combobox(o);
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert("获取字典数据失败！可能是已经超时，请重新登录！");
                }
            });
        }
        function fillCombobox() {

            //$('#spantxtReason').css("display", "none");//
            //取结果的下拉框的值
            $("#txtCenterSpotChecksResult").combobox({
                url: "../PR/Medical/GetMSDictionaryInfo?TypeCode=SpotChecksResult",
                valueField: 'Name',
                textField: 'Name',
                editable: false,
                prompt: '--请选择--',
                onSelect: function (rec) {
                    var ids = $('#txtCenterSpotChecksResult').combobox('getValue');
                    if (ids == '不合格') {
                        $('#spantxtReason').css("display", "");//

                        EUIcombobox("#txtCenterSpotChecksUnqualifiedReason",{
                            url: "../PR/Medical/GetMSDictionaryInfo?TypeCode=SpotChecksUnqualifiedReason",
                            method: 'POST',
                            valueField: 'Name',
                            textField: 'Name',
                            editable: false,
                            OneOption: [{
                                ID: "",
                                Name: "--请选择--"
                            }],
                            onSelect: function () {
                                $('#txtCenterSpotChecksUnqualifiedReason').combobox('getValue');
                            }
                        });
                    }
                    else {
                        $('#txtCenterSpotChecksUnqualifiedReason').combobox('clear');
                        $('#spantxtReason').css("display", "none");//}
                    }
                }
            });
            //根据不合格原因
            EUIcombobox("#txtCenterSpotChecksUnqualifiedReason", {
                url: "../PR/Medical/GetMSDictionaryInfo?TypeCode=SpotChecksUnqualifiedReason",
                method: 'POST',
                valueField: 'Name',
                textField: 'Name',
                editable: false,
                OneOption: [{
                    ID: "",
                    Name: "--请选择--"
                }]
            });

        }

        // 实现UpdatePanel中可以再添加easyUI的样式
        function reload() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }
        function EndRequestHandler() {
            fillCombobox();
            $('#selectyear').numberbox();
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td>查询年份：</td>
                            <td>
                                <asp:TextBox ID="selectyear" class="easyui-numberbox" Style="width: 150px" runat="server" ></asp:TextBox>
                            </td>

                            <td style="text-align: right">中心审核结果：</td>
                            <td>
                                <asp:TextBox ID="txtCenterSpotChecksResult" class="easyui-combobox" Style="width: 100px"  data-options="panelHeight:'auto'"   runat="server"  ></asp:TextBox>

                            </td>

                            <td style="text-align: right"> <span  id="spantxtReason"> 未通过原因：
                                <asp:TextBox ID="txtCenterSpotChecksUnqualifiedReason" class="easyui-combobox" Style="width: 160px" runat="server"></asp:TextBox>
                                </span>
                            </td>
                            <td>
                                <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
                            </td>

                        </tr>

                    </table>
                </ContentTemplate>
            </asp:UpdatePanel>
            <div style="background-color: #fafafa; border-left: 1px solid scrollbar; height: 100%;">
                <rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="100%"  SizeToReportContent="True"></rsweb:ReportViewer>
            </div>
        </div>
    </form>
</body>
</html>
